<?php
	// Config
	$dataSubmitReg = array(
		'name'	=> 'regbutton',
		'id'	=> 'btn-reg',
		'value'	=> 'Register',
		'type'	=> 'submit'); 
	
    $dataInputUser = array(
		'name'	=> 'username',
		'value'	=> set_value('username'),
    	'maxlength'	=> '15');
    
    $dataInputPass = array(
		'name'	=> 'password',
		'value'	=> set_value('password'),
    	'maxlength'	=> '20'); 
    
    $dataInputConfPass = array(
		'name'	=> 'confPassword',
		'value'	=> set_value('confPassword'),
    	'maxlength'=> '20');  
    
    $dataInputEmail = array(
		'name'	=> 'email',
		'value'	=> set_value('email'),
    	'maxlength'=> '30');               
	
    // Printing register form
    echo 
	"<div id='registerDiv'>" .
		"<div class='validation'>" .
			validation_errors() . 
		"</div>" .
		form_open(current_url()) 
			. "<p>Username</p>" 
			. form_input($dataInputUser)
			. "<p>Password</p>" 
			. form_password($dataInputPass)
			. "<p>Password Confirm</p>" 
			. form_password($dataInputConfPass) 
			. "<p>Email</p>" 
			. form_input($dataInputEmail) 
			. form_submit($dataSubmitReg) .
		form_close() .
	"</div>";